package com.wr.juxing;

/**
 * @Slogan: 哆啦A梦的口号你忘了么 ？
 * 生活百般滋味，人生需要笑对！！！
 */
public class PlainRact extends Rect {
    Double startX;
    Double starty;

    public PlainRact(Double width, Double height, Double startX, Double starty) {
        super(width, height);
        this.startX = startX;
        this.starty = starty;
    }

    public PlainRact() {
        this.startX = 0.0;
        this.starty = 0.0;
        this.width = 0.0;
        this.height = 0.0;
    }

    public Boolean isInside(double x,double y){
        Boolean results;

        if (x>startX&&x<(startX+width)&&y<starty&&y>(starty-height)){
            results = true;
        }else
            results = false;

        if (results){
            System.out.println("点在矩形内。");
        }else
            System.out.println("点不在矩形内。");

        Rect rect = new Rect();
//        rect.getArea();


//        System.out.println(results);
        return results;
    }
}
